var express = require('express');
var router = express.Router();

let login = require('../src/service/loginSer')

//登录
router.get('/login/:user/:pwd', async function (req, res, next) {
  let { user, pwd } = req.params;
  let result = await login.login({ user, pwd });
  res.json(result);
});

//注册管理员
router.post('/addlog/:user/:pwd', async function (req, res, next) {
  let { user, pwd } = req.params;
  let result = await login.loginadd({ user, pwd });
  res.json(result);
});


module.exports = router;
